﻿@using ZoomLa.Components
@using ZoomLa.Model
@using ZoomLa.BLL
@using ZoomLaCMS.Models.Field
@model ZoomLa.Model.M_CommonData
@{
    
    string action = MVCHelper.GetAction(Url.Action("Content_Add", "Pages"), Request);
    M_Templata nodeMod=ViewBag.nodeMod;
}
@section head{
    <title>添加黄页内容</title>
    <script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Plugins/Ueditor/ueditor.all.min.js"></script>
}
@section content{ 
 <div id="pageflag" data-nav="page" data-ban="page"></div>
    <div class="container">
     <ol class="breadcrumb">
        <li class="active">企业黄页</li>
        <li><a href="@Url.Action("Default", "Pages")">黄页管理</a></li>
        <li><a href="@Request.RawUrl">内容管理</a></li>
    </ol> 
        <form method="post" action="@action">
            <ul class="fd_body">
                <li class="fd_item">
                    <div class="fd_item_head">所属栏目:<span>@nodeMod.TemplateName</span></div>
                </li>
                <li class="fd_item">
                    <div class="fd_item_head">内容标题:</div>
                    <div class="fd_item_field">
                        @Html.TextBoxFor(m => m.Title, new { @id = "title_t", @class = "form-control m715-50" })
                        <span><font color="red">*</font></span>
                    </div>
                </li>
                @Html.Partial("Fields/Index_User_AddContent", new VM_FieldModel(Model.ModelID, Model.NodeID, new ModelConfig() { Source = ModelConfig.SType.UserContent }, Model.GeneralID))
                <li class="fd_item">
                    <div class="fd_item_head">主编辑器扩展图:</div>
                    <div class="fd_item_field">
                        <ul id="ThumImg_ul" class="preview_img_ul" style="min-height:120px;">
                            <div class="clearfix"></div>
                        </ul>
                        <input type="hidden" id="ThumImg_Hid" name="ThumImg_Hid" value="@Model.TopImg" />
                    </div>
                </li>
            </ul>
            <div class="clear"></div>
            <div class="text-center">
                <input type="submit" value="@ViewBag.op" class="btn btn-primary" />
                <a href="Default" class="btn btn-primary">返回列表</a>
            </div>
        </form>
    </div>
}
@section script{
    <script>
        var zlconfig = {
            adminPath: "@CustomerPageAction.customPath2",
            updir: "@SiteConfig.SiteOption.UploadDir.ToLower()",
            duptitlenum: "@SiteConfig.SiteOption.DupTitleNum",
            modelid: "@Request["ModelID"]"
        };
        $(function () {
            $("form").validate({
                rules: {
                    title_t: { required: true, maxlength: 30 },
                },
                message: {
                    title_t: { required: "内容标题必填" },
                }
            });
        })
    </script>
    <script type="text/javascript" src="/JS/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/JS/Common.js"></script>
    <script type="text/javascript" src="/JS/Controls/ZL_Dialog.js"></script>
    <script type="text/javascript" src="/JS/ICMS/tags.json"></script>
    <script type="text/javascript" src="/JS/ZL_Content.js"></script>
}
